using UnityEngine;
using System.Collections;

public class Loading : MonoBehaviour {

	public GameObject loadOBj;
	public GameObject active;
	public GameObject save;
	float timer;
	float z;
	void Update () 
	{
		z += 4;
		loadOBj.transform.eulerAngles = new Vector3(0,0,z);
		timer += Time.deltaTime;
		if(timer >= 5)
		{
			gameObject.SetActiveRecursively(false);
			active.SetActiveRecursively(true);
			save.SetActiveRecursively(false);
			loadOBj.transform.eulerAngles = new Vector3(0,0,0);
			timer = 0;
		}
	}
}
